package lintcode.NO2404;

import java.util.Arrays;

/**
 * @Author: zeng
 * @Date: 2025/05/14/17:59
 * @Description:
 **/
public class TestMain {
  public static void main(String[] args) {
    Integer[] arr = new Integer[]{2,6,8,6,2,9,5,8,7};
    //使用Arrays去除上面数组中的重复元素并且排序
    Integer[] arr1 = Arrays.stream(arr).distinct().sorted().toArray(Integer[]::new);
    System.out.println(Arrays.toString(arr1));

  }
}
